<?php
/* -----------------------------------------------------------------------------------------
   $Id: newsletter.php,v 1.0 

   XTC-NEWSLETTER_RECIPIENTS RC1 - Contribution for XT-Commerce http://www.xt-commerce.com
   by Matthias Hinsche http://www.gamesempire.de

   Copyright (c) 2003 XT-Commerce
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce www.oscommerce.com 
   (c) 2003	 nextcommerce www.nextcommerce.org

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/

$box_smarty = new smarty;
$box_smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/'); 

$title = getBoxTitle($box_name);
$box_smarty->assign('box_name', $box_name);
$box_smarty->assign('BOX_TITLE', $title);
$box_smarty->assign('language', $_SESSION['language']);

$desc_query = xtc_db_query("SELECT box_desc FROM boxes_names WHERE box_name = '".$box_name."' AND language_id = '".$_SESSION['languages_id']."'");
if(xtc_db_num_rows($desc_query)){
	$desc = xtc_db_fetch_array($desc_query);
}

$box_smarty->assign('BOX_CONTENT',$desc['box_desc']);

if (!CacheCheck()) {
	$box_smarty->caching = 0;
	$box_content = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box.html');
} else {
	$box_smarty->caching = 1;	
	$box_smarty->cache_lifetime=CACHE_LIFETIME;
	$box_smarty->cache_modified_check=CACHE_CHECK;
	$cache_id = $_SESSION['language'].'_'.$box_name;
	$box_content = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box.html',$cache_id);
}

?>